<template>
<div class='main'>
    <div class='head'>
        <el-breadcrumb separator="/">
          <el-breadcrumb-item :to="{path:'/'}">系统设置</el-breadcrumb-item>
          <el-breadcrumb-item :to="{path:'/'}">区域管理</el-breadcrumb-item>
          <el-breadcrumb-item :to="{path:'/'}">地块信息</el-breadcrumb-item>
        </el-breadcrumb>
    </div>
    <div class='content'>
        <div class='title'>新增地块信息</div>
       <el-form ref="form" :model="form" label-width="160px" style='width:80%;margin:auto;'>
            <el-form-item label="地块名称">
              <el-input v-model="form.roleName"></el-input>
          </el-form-item> 
            <el-form-item label="所属基地">
              <el-select v-model="form.roleName" style='width:100%;'></el-select>
          </el-form-item> 
          <el-form-item label="地块用途">
              <el-select v-model="form.roleName" style='width:100%;'></el-select>
          </el-form-item>
          <el-form-item label="地块面积（亩）">
              <el-input v-model="form.roleName"></el-input>
          </el-form-item> 
                  <el-form-item label="地块经度">
              <el-row>
                  <el-col :span="7"><el-input v-model="form.pr"></el-input></el-col>
                  <el-col :span="1">°</el-col>
                  <el-col :span="7"><el-input v-model="form.cit"></el-input></el-col>
                   <el-col :span="1">′</el-col>
                  <el-col :span="7"><el-input v-model="form.cou"></el-input></el-col>
                   <el-col :span="1">″</el-col>
              </el-row>
                  </el-form-item>
              <el-form-item label="地块纬度">
                <el-row>
                  <el-col :span="7"><el-input v-model="form.pr"></el-input></el-col>
                  <el-col :span="1">°</el-col>
                  <el-col :span="7"><el-input v-model="form.cit"></el-input></el-col>
                   <el-col :span="1">′</el-col>
                  <el-col :span="7"><el-input v-model="form.cou"></el-input></el-col>
                   <el-col :span="1">″</el-col>
              </el-row>
          </el-form-item> 
          <el-form-item label="负责人">
              <el-input v-model="form.roleName"></el-input>
          </el-form-item> 
           <el-form-item label="传感设备">
              <el-button type='primary' @click='add'>添加</el-button>
          </el-form-item>
           <el-form-item label="视频设备">
              <el-button type='primary' @click='add'>添加</el-button>
          </el-form-item>
        <el-form-item>
           <el-button @click="onSubmit" type='primary'>确定</el-button>
           <el-button @click='onCancel'>取消</el-button>
          </el-form-item> 
        </el-form>
    </div>
    <el-dialog title="传感设备选择" :visible.sync="dialogFormVisible">
         <el-form label-width="100px">
    <el-row>
        <el-col :span="8">
            <el-form-item label="网关编号">
        <el-input v-model="search" placeholder="">
        </el-input>
         </el-form-item>
        </el-col>
        <el-col :span="8">
             <el-form-item label="采集器编号">
        <el-input v-model="search" placeholder="">
        </el-input>
        </el-form-item>
        </el-col>
        <el-col :span="8">
             <el-form-item>
        <el-input v-model="search" placeholder="">
             <el-button slot="append">搜素</el-button>
        </el-input>
        </el-form-item>
        </el-col>
    </el-row>
    </el-form>
    <el-table :data="gridData" border>
    <el-table-column type="selection" width="100px"></el-table-column>
    <el-table-column prop="name" label="角色名称"></el-table-column>
    <el-table-column prop="address" label="角色描述"></el-table-column>
  </el-table>
  <div slot="footer" class="dialog-footer">
    <el-button @click="dialogFormVisible = false">取 消</el-button>
    <el-button type="primary" @click="submit">确 定</el-button>
  </div>
</el-dialog>
</div>
</template>
<script>
  export default {
    name: 'plotInfo',
    data() {
      return {
        form: {
        },
        dialogFormVisible:false,
        search: '',
        gridData: []
      }
    },
   beforeRouteEnter (to, from, next) {
      next(vm =>{
      })
   },   
    methods: {
      onSubmit() {
        console.log(this.form);
      },
      onCancel() {
        this.$router.go(-1)
    },
    add() {
        this.dialogFormVisible = true
    },
    submit () {}
    }
    
  }
</script>
<style lang="scss">
.main{
padding: 10px 20px;
}
.title{
    font-size: 20px;
    font-weight: 600;
    margin: 10px;
}
</style>